package com.jm.springboot21.mapper;

import com.jm.springboot21.pojo.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentMapper {
    List<Student> findAll();
    void addStudent(Student student);
    //根据id查询员工
    Student findById(int id);
    List<Student> findByName(String name);

    void deleteById(int id);
    //    多选删除
    void deleteByIds(List<Integer> ids);
    void updateById(Student student);
    //总人数
    @Select("select count(*) from student")
    Integer count();
}
